// 引用网络请求中间件
import request from '../../utils/request.js';
const API_NAME = '/quanzi-device'

/* 设备 */

export default {
	/* 设备绑定 */
	devBind(data) {
		return request({
			url: `${API_NAME}/watch/bindingEquipment`,
			method: 'POST',
			data
		})
	},
	/* 获取历史坐标接口 */
	getHosGps(id) {
		return request({
			url: `${API_NAME}/watch/getHistoryPosition?uequipmentId=${id}`,
			method: 'GET',
		})
	},
	/* 获取心跳步速*/
	getHeartStep(id) {
		return request({
			url: `${API_NAME}/watch/getHeartRateSateUp?uequipmentId=${id}`,
			method: 'GET',
		})
	},
	/* 获取最新坐标及距离 */
	getNewGpsAndDis(id) {
		return request({
			url: `${API_NAME}/watch/getUpToDatePosition?uequipmentId=${uequipmentId}&longitude=${longitude}&latitude=${latitude}`,
			method: 'GET',
		})
	},
	/*为终端设置sos手机*/
	setPhoneForDev(data) {
		return request({
			url: `${API_NAME}/watch/setReportingInterval`,
			method: 'POST',
			data
		})
	},
}